<?php
define('APPTYPEID', 502);
define('CURSCRIPT', 'gettingstarted');

require './source/class/class_core.php';
$discuz = & discuz_core::instance();

$modarray = array('index', 'activeemail','avatarupdate', 'profileupdate', 'findfriends');

$modcachelist = array(
	'index' => array('index', 'diytemplatename'),
);

$mod = getgpc('mod');
$mod = (empty($mod) || !in_array($mod, $modarray)) ? 'index' : $mod;
$discuz->init();

if ($mod == 'index'){
	if(!$_G['member'][emailstatus] && !$_G['inajax']){
		dheader('location: gettingstarted.php?mod=activeemail');
	}
	if(!$_G['member']['avatarstatus']){
		dheader('location: gettingstarted.php?mod=avatarupdate');
	}
	dheader('location: gettingstarted.php?mod=findfriends');
}

define('CURMODULE', $mod);

if (!$_G['uid']){
	showmessage('login_before_enter_home',null,array(),array('showmsg'=>true, 'login'=>1));
}
runhooks();

require DISCUZ_ROOT.'./source/module/member/member_'.$mod.'.php';